package graphen;

import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JFrame;
import graphen.struktur.*;

public class GraphApp extends JFrame{
  
  public GraphApp(Graph graph){
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setSize(400,300);
    Container c=getContentPane();
    GraphPanel p=new GraphPanel(graph);
    c.add(p, BorderLayout.CENTER);
    setVisible(true);
  }
  
  public static void main(String[] args){
    Graph graph=new Graph(args[0]);
    new GraphApp(graph);
    Graph.Plan plan=graph.getPlan(5);
    for(int i=0; i<graph.anzKnoten(); ++i)
      System.out.println(plan.getWegNamenNach(i));
  }
}
